<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>示例4</title>
    <script src="jquery.js"></script>
    <script>
        function deleteli(){
            if($(".animationList>li").length==0){
                alert("已经没有内容了")
                return
            }
            $(".animationList>li:eq(0)").remove()
        }

        function emptyli(){
            $(".animationList>li:eq(1)").empty()
        }
    </script>
</head>
<body>
    <h2>热门动画排行</h2>
    <button onclick="deleteli()">删除</button>
    <button onclick="emptyli()">清空内容</button>
    <ul class="animationList">
        <li>名侦探柯南</li>
        <li>阿拉蕾</li>
        <li>海贼王</li>
    </ul>
</body>
</html>